﻿using System;
using System.Collections.Generic;

namespace Rj.PersonnelVerification.Server.DataBaseContext.Entities
{
    public partial class ActRuCaseExecution
    {
        public ActRuCaseExecution()
        {
            ActRuCaseSentryPartCaseExecs = new HashSet<ActRuCaseSentryPart>();
            ActRuCaseSentryPartCaseInsts = new HashSet<ActRuCaseSentryPart>();
            ActRuTasks = new HashSet<ActRuTask>();
            ActRuVariableCaseExecutions = new HashSet<ActRuVariable>();
            ActRuVariableCaseInsts = new HashSet<ActRuVariable>();
            InverseCaseInst = new HashSet<ActRuCaseExecution>();
            InverseParent = new HashSet<ActRuCaseExecution>();
        }

        public string Id { get; set; } = null!;
        public int? Rev { get; set; }
        public string? CaseInstId { get; set; }
        public string? SuperCaseExec { get; set; }
        public string? SuperExec { get; set; }
        public string? BusinessKey { get; set; }
        public string? ParentId { get; set; }
        public string? CaseDefId { get; set; }
        public string? ActId { get; set; }
        public int? PrevState { get; set; }
        public int? CurrentState { get; set; }
        public byte? Required { get; set; }
        public string? TenantId { get; set; }

        public virtual ActReCaseDef? CaseDef { get; set; }
        public virtual ActRuCaseExecution? CaseInst { get; set; }
        public virtual ActRuCaseExecution? Parent { get; set; }
        public virtual ICollection<ActRuCaseSentryPart> ActRuCaseSentryPartCaseExecs { get; set; }
        public virtual ICollection<ActRuCaseSentryPart> ActRuCaseSentryPartCaseInsts { get; set; }
        public virtual ICollection<ActRuTask> ActRuTasks { get; set; }
        public virtual ICollection<ActRuVariable> ActRuVariableCaseExecutions { get; set; }
        public virtual ICollection<ActRuVariable> ActRuVariableCaseInsts { get; set; }
        public virtual ICollection<ActRuCaseExecution> InverseCaseInst { get; set; }
        public virtual ICollection<ActRuCaseExecution> InverseParent { get; set; }
    }
}
